{layout "../Layout/layout.latte"}
{block headTitle}修改密码{/block}
{block tabs_content}
    {*{include "./tabs.latte"}*}
{/block}
{block private_js}
    <script type="text/javascript">
        $(function () {
            $("#bnt").click(function () {
                var sid ={$sid};
                $.ajax({
                    type: "post",
                    url: $("#formArticle").attr("action"),
                    data: $("#formArticle").serialize(),
                    cache: false,
                    dataType: "json",
                    success: function (data) {
                        console.log(data);
                        if (data.status == "n") {
                            $.toast(data.info);
                            return false;
                        } else {
                            $.toast("修改成功");
                            setTimeout(function () {
                                $.showPreloader();
                                if (sid == 0) {
                                    location.replace({url("mobileConsoles_externalRelations_lists","different=yes")});
                                }
                                else {
                                    location.replace(data.data);
                                }
                            }, 2000);
                        }
                    }
                });
            })
        });
    </script>
{/block}
{block private_css}
    <style>
        .item-title, input{ font-size:0.9rem !important; }
    </style>
{/block}
{block content}
    <form id="formArticle" class="stdform mform" method="post" action="{$url}" onsubmit="return false">
        <div class="list-block">
            <ul>
                <li>
                    <div class="item-content">
                        <div class="item-media"><i class="icon icon-form-name"></i></div>
                        <div class="item-inner">
                            <div class="item-title label">旧密码</div>
                            <div class="item-input">
                                <input type="password" placeholder="旧密码" name="oldpwd">
                            </div>
                        </div>
                    </div>
                </li>
                <li>
                    <div class="item-content">
                        <div class="item-media"><i class="icon icon-form-email"></i></div>
                        <div class="item-inner">
                            <div class="item-title label">新密码</div>
                            <div class="item-input">
                                <input type="password" placeholder="新密码" name="pwd">
                            </div>
                        </div>
                    </div>
                </li>
                <li>
                    <div class="item-content">
                        <div class="item-media"><i class="icon icon-form-email"></i></div>
                        <div class="item-inner">
                            <div class="item-title label">确认密码</div>
                            <div class="item-input">
                                <input type="password" placeholder="确认密码" name="pwd2">
                            </div>
                        </div>
                    </div>
                </li>
            </ul>
        </div>
    </form>
    <div class="content-block">
        <div class="col-95">
            <div class="button button-big button-fill" id="bnt">提交</div>
        </div>
    </div>
{/block}

{block footer}
    {if $sid!=0}
        {control MobileConsoles:Layout:footer}
    {/if}
{/block}
